<%--
  Created by IntelliJ IDEA.
  User: 19000
  Date: 2022/8/18
  Time: 20:21
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type"/>
    <meta content="IE=edge" http-equiv="X-UA-Compatible">
    <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" name="viewport"/>
    <meta content="webkit" name="renderer">
    <link href="${pageContext.request.contextPath}/css/pintuer.css" rel="stylesheet">
    <link href="${pageContext.request.contextPath}/css/admin.css" rel="stylesheet">
    <script src="${pageContext.request.contextPath}/js/jquery.js"></script>
    <script src="${pageContext.request.contextPath}/js/pintuer.js"></script>
</head>
<body>

<div class="panel admin-panel margin-top">
    <div class="panel-head" id="add"><strong><span class="icon-pencil-square-o"></span>修改商品</strong></div>
    <div class="body-content">
        <form action="${pageContext.request.contextPath}/product/updateProduct" class="form-x" method="post">
            <input name="id" type="hidden" value="${product.id}"/>

            <div class="form-group">
                <div class="label">
                    <label>商品名称：</label>
                </div>
                <div class="field">
                    <input class="input w50" data-validate="required:请输入商品名称" name="name" type="text"
                           value="${product.name}"/>
                    <div class="tips"></div>
                </div>
            </div>

            <div class="form-group">
                <div class="label">
                    <label>商品价格：</label>
                </div>
                <div class="field">
                    <input class="input w50" data-validate="required:请输入商品价格" name="price" type="text"
                           value="${product.price}"/>
                    <div class="tips"></div>
                </div>
            </div>


            <div class="form-group">
                <div class="label">
                    <label>商品介绍：</label>
                </div>
                <div class="field">
                    <textarea class="input" name="description" style="height:100px;"
                              type="text">${product.description}</textarea>
                </div>
            </div>

            <div class="form-group">
                <div class="label">
                    <label>商品库存：</label>
                </div>
                <div class="field">
                    <input class="input w50" data-validate="required:请输入商品库存" name="stock" type="text"
                           value="${product.stock}"/>
                    <div class="tips"></div>
                </div>
            </div>



            <div class="form-group">
                <div class="label">
                    <label>是否上架：</label>
                </div>
                <div class="field">
                    <div class="button-group radio">

                        <label <c:if test="${product.status == 0}">
                                class="button active"
                                </c:if>
                                <c:if test="${product.status == 1}">
                                    class="button "
                                </c:if>>
                            <span class="icon icon-check"></span>
                            <input name="status" type="radio" value="0"
                                   <c:if test="${product.status == 0}">checked="checked" </c:if>>是
                        </label>

                        <label <c:if test="${product.status == 1}">
                                    class="button active"
                                </c:if>
                                <c:if test="${product.status == 0}">
                                    class="button "
                                </c:if>>
                            <span class="icon icon-times"></span>
                            <input name="status" type="radio" value="1"
                                   <c:if test="${product.status == 1}">checked="checked"</c:if>>否
                        </label>
                    </div>
                </div>
            </div>


            <div class="form-group">
                <div class="label">
                    <label></label>
                </div>
                <div class="field">
                    <button class="button bg-main icon-check-square-o" type="submit"> 提交</button>
                </div>
            </div>
        </form>
    </div>
</div>
</body>
</html>